﻿@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>
    <script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/MicrosoftAjax.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/MicrosoftMvcAjax.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/yq.Ajax.js")" type="text/javascript"></script>

@using (Ajax.BeginForm("Ex", new { }, new AjaxOptions() { UpdateTargetId = "txtid" }))
{ 
  <div id="txtid">
  
  </div>
  @Html.TextArea("name")

  @Html.Submit();
}

<input  type="button" onclick="ontest()"/>

<script>

    function ontest() {
        $.AjaxServer("@(Url.Action("Ex"))",{},function(oh)
        {
          alert(oh);
        
        })
    }
</script>

<script>
   
   
</script>